package org.jeecg.modules.device.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.device.entity.DevReservoirInfo;
import org.jeecg.modules.device.mapper.DevReservoirInfoMapper;
import org.jeecg.modules.device.service.IDevReservoirInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description: 水库信息表
 * @Author: jeecg-boot
 * @Date:   2024-04-17
 * @Version: V1.0
 */
@Service
public class DevReservoirInfoServiceImpl extends ServiceImpl<DevReservoirInfoMapper, DevReservoirInfo> implements IDevReservoirInfoService {
    @Autowired
    private DevReservoirInfoMapper devReservoirInfoMapper;

    @Override
    public DevReservoirInfo queryByCod(String code) {
        return devReservoirInfoMapper.selectOne(Wrappers.<DevReservoirInfo>lambdaQuery()
                .eq(DevReservoirInfo::getCode, code).last("limit 1"));

    }
}
